@extends('admin.app')

@section('breadcrumb')
<div class="bg-light lter b-b wrapper-md">
  <ol class="breadcrumb bg-light lter m-n no-padder">
    <li><a href="{{ admin_action('HomeController@index') }}">主页</a></li>
    <li>业务管理</li>
    <li><a href="{{ admin_action('Business\ProjectTypeTemplateController@index') }}">项目类型管理</a></li>
    <li><a href="{{ admin_action('Business\ProjectTypeTemplateAttributesController@index',[$template_id]) }}">模板属性管理</a></li>
    <li class="active">新增基本信息</li>
  </ol>
</div>
@endsection

@section('content')
  <div class="panel panel-default">
    <div class="panel-heading font-bold">
      模板基本信息表单
    </div>
    <div class="panel-body">
      <form enctype="multipart/form-data" class="form-horizontal form-validation" action="{{ admin_action('Business\ProjectTypeTemplateAttributesController@store',[$template_id]) }}" method="post">
        {{ csrf_field() }}
        <input type="hidden" name="template_attribute" value="0" />
        <div class="form-group">
          <label class="col-lg-2 control-label">属性名称*</label>
          <div class="col-lg-10">
            <input type="text" class="form-control" name="name" value="{{ old('name') }}" placeholder="请输入属性名称" data-rule-required="true" data-rule-maxlength="50">
          </div>
        </div>

        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">内容*</label>
          <div class="col-lg-10">
            <script  id="ueditor_container" name="content" type="text/plain"></script>
          </div>
        </div>

        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">排序*</label>
          <div class="col-lg-10">
            <input type="text" class="form-control" name="sort" value="{{ old('sort')??0 }}"
                   placeholder="请输入排序" data-rule-required="true" data-rule-digits="true">
          </div>
        </div>

        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <div class="col-lg-4 col-lg-offset-2">
            <a href="{{ admin_action('Business\ProjectTypeTemplateAttributesController@index',[$template_id]) }}" class="btn btn-default">返&nbsp;回</a>
            <button type="submit" class="btn btn-primary">保&nbsp;存</button>
          </div>
        </div>
      </form>
    </div>
  </div>
@endsection
@section('scripts')
  @include('admin.partials.ueditor')
@endsection